<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tld/importTag.tld" prefix="importTag"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@page import="org.apache.commons.lang.math.RandomUtils"%>
<c-rt:set var="frontContentHtmlPath" value='<%=ServerValue.getFrontContentHtmlPath()%>'/>
<script type="text/javascript" charset="UTF-8" src="/js/jquery.flash.js"></script>
<script type="text/javascript" charset="UTF-8" src="/js/jquery.random.js"></script>
<!-- javascript start -->
<script type="text/javascript">
	$().ready(function(){
		//品牌
		$.ajax({
		    url:'<%=ServerValue.getFrontHostname()%>/pages/BRAND/${category.id}.html',
		    type:'HEAD',
		    success:
		        function(){
		        	$("#brandarea").load("/pages/BRAND/${category.id}.html");
		        }
		});
		//default this menu is selected
		initCategory();
			
		//random show maingold
		var maingoldNum = $.random(5);
		$("div.tab-area.main-gold > ul.tab-list > li").eq(maingoldNum).attr("class",$("div.tab-area.main-gold > ul.tab-list > li").eq(maingoldNum).attr("class")+"-f");
		$("#main-gold-" + (maingoldNum + 1)).show();

		//promotion top
		var topNum = $.random(5);
		//alert($("#top-tab-area"));
		$("#top-tab-area > ul.tab-list > li").eq(topNum).attr("class",$("#top-tab-area > ul.tab-list > li").eq(topNum).attr("class")+"-f");
		$("#top-tab-area-" + (topNum + 1)).show();	
		
		//promotion mid
		var midNum = $.random(5);
		$("#mid-tab-area > ul.tab-list > li").eq(midNum).attr("class",$("#mid-tab-area > ul.tab-list > li").eq(midNum).attr("class")+"-f");
		$("#mid-tab-area-" + (midNum + 1)).show();	
		
		//promotion btm
		var btmNum = $.random(5);
		$("#btm-tab-area > ul.tab-list > li").eq(btmNum).attr("class",$("#btm-tab-area > ul.tab-list > li").eq(btmNum).attr("class")+"-f");
		$("#btm-tab-area-" + (btmNum + 1)).show();		
				
		$("#main").attr("class","${category.templateId}");

		//default tab3
		var tab3Num = $.random(3);
		$("div#tab3 > ul.tab-right > li").eq(tab3Num).attr("class",$("div#tab3 > ul.tab-right > li").eq(tab3Num).attr("class")+"f");
		$("div#tab3 > div").eq(tab3Num).show();	
	});
</script>
<!-- javascript end -->	
<!-- sidebar start -->
<div class="sidebar">
	<!-- menu start -->
	<importTag:static path="${frontContentHtmlPath}${category.id}/SIDEBAR.html"/>
	<!-- menu end -->
  <div class="ad-sky">
  	<script type="text/javascript">
			GA_googleFillSlot("yd100_${tempZId}_sidebar_right_image_01");
		</script>
  </div>
  <div class="lt-bn-end">
  	<script type="text/javascript">
			GA_googleFillSlot("yd100_${tempZId}_sidebar_right_image_02");
			GA_googleFillSlot("yd100_${tempZId}_sidebar_right_image_03");
		</script>
  </div>  
</div>
<!-- sidebar end -->
<!-- content start -->
<div class="content">
   <!-- 中间 start -->
   <div class="centerarea">
		<!-- tab area block adv start -->
		<div class="main-banner">
		<c-rt:set var="mainGoldNum"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
		<c-rt:set var="mainGold"><importTag:static path="${frontContentHtmlPath}${category.id}/MAINGOLD_${mainGoldNum}.html"/></c-rt:set>
		<c-rt:choose>
			<c-rt:when test="${not empty mainGold}">${mainGold}</c-rt:when>
			<c-rt:otherwise>
				<importTag:static path="${frontContentHtmlPath}${category.id}/MAINGOLD_1.html"/>
			</c-rt:otherwise>
		</c-rt:choose>
		</div>
		<!-- tab area block adv end -->
		<!-- tab area top start -->
		<!-- tab area top start -->
		<div class="tab-area" id="top-tab-area">
			<c-rt:set var="topNum"><%=RandomUtils.nextInt(5)+1%></c-rt:set>
			<c-rt:set var="topPromotion"><importTag:static path="${frontContentHtmlPath}${category.id}/PROMOTION_TOP_${topNum}.html"/></c-rt:set>
			<c-rt:choose>
				<c-rt:when test="${not empty topPromotion}">${topPromotion}</c-rt:when>
				<c-rt:otherwise>
					<importTag:static path="${frontContentHtmlPath}${category.id}/PROMOTION_TOP_1.html"/>
				</c-rt:otherwise>
			</c-rt:choose>
		</div>
		<!-- tab area top end -->
		<!-- tab area mid start -->
		<div class="tab-area" id="mid-tab-area">
			<c-rt:set var="midNum"><%=RandomUtils.nextInt(5)+1%></c-rt:set>
			<c-rt:set var="midPromotion"><importTag:static path="${frontContentHtmlPath}${category.id}/PROMOTION_MID_${midNum}.html"/></c-rt:set>
			<c-rt:choose>
				<c-rt:when test="${not empty midPromotion}">${midPromotion}</c-rt:when>
				<c-rt:otherwise>
					<importTag:static path="${frontContentHtmlPath}${category.id}/PROMOTION_MID_1.html"/>
				</c-rt:otherwise>
			</c-rt:choose>
		</div>
		<!-- tab area mid end-->
		<!-- tab area btm start -->
		<div class="tab-area" id="btm-tab-area">
			<c-rt:set var="btmNum"><%=RandomUtils.nextInt(5)+1%></c-rt:set>
			<c-rt:set var="btmPromotion"><importTag:static path="${frontContentHtmlPath}${category.id}/PROMOTION_BTM_${btmNum}.html"/></c-rt:set>
			<c-rt:choose>
				<c-rt:when test="${not empty btmPromotion}">${btmPromotion}</c-rt:when>
				<c-rt:otherwise>
					<importTag:static path="${frontContentHtmlPath}${category.id}/PROMOTION_BTM_1.html"/>
				</c-rt:otherwise>
			</c-rt:choose>
		</div>
		<!-- tab area btm end--> 
		<!-- good object area start -->
		<importTag:static path="${frontContentHtmlPath}${category.id}/GOODOBJECT.html"/>
		<!-- good object area end -->
		<img src="/images/none.gif" class="cf" />
   </div>
   <!-- 中间 end -->
   <!-- 右栏 -->
   <div class="right-bar">
		<!-- 品牌旗舰 start -->
		<div id="brandarea"></div>
		<!-- 品牌旗舰  end-->
		<!-- 排行榜 start -->
		<c-rt:set var="rankingNum"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
		<c-rt:set var="ranking"><importTag:static path="${frontContentHtmlPath}${category.id}/RANKINGLIST_${rankingNum}.html"/></c-rt:set>			
		<c-rt:choose>
			<c-rt:when test="${not empty ranking}">${ranking}</c-rt:when>
			<c-rt:otherwise>
				<c-rt:set var="ranking"><importTag:static path="${frontContentHtmlPath}${category.id}/RANKINGLIST_1.html"/></c-rt:set>
				<c-rt:if test="${not empty ranking}">${ranking}</c-rt:if>
			</c-rt:otherwise>
		</c-rt:choose>	
		<!-- 排行榜 end -->
		<!-- 活动快讯  start -->
		<c-rt:set var="infoNum"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
		<c-rt:set var="info"><importTag:static path="${frontContentHtmlPath}${category.id}/INFO_${infoNum}.html"/></c-rt:set>
		<c-rt:choose>
			<c-rt:when test="${not empty info}">${info}</c-rt:when>
			<c-rt:otherwise><importTag:static path="${frontContentHtmlPath}${category.id}/INFO_1.html"/></c-rt:otherwise>
		</c-rt:choose>
		<!-- 活动快讯  end -->
		<!-- 強力放送  start -->
		<c-rt:set var="broadCastNum"><%=RandomUtils.nextInt(3)+1%></c-rt:set>
		<c-rt:set var="broadCast"><importTag:static path="${frontContentHtmlPath}${category.id}/BROADCAST_${broadCastNum}.html"/></c-rt:set>
		<c-rt:choose>
			<c-rt:when test="${not empty broadCast}">${broadCast}</c-rt:when>
			<c-rt:otherwise><importTag:static path="${frontContentHtmlPath}${category.id}/BROADCAST_1.html"/></c-rt:otherwise>
		</c-rt:choose>
		<!-- 强力放送  end -->
		<!-- 右欄廣告腳 -->
  	<div class="rt-bn-end">
  		<script type="text/javascript">
				GA_googleFillSlot("yd100_${tempZId}_lr_image_01");
			</script>
  	</div>
  	<!-- 右欄廣告腳 -->
   </div>
   <!-- 右栏 -->
</div>